{? if $errors|@is_array || $errors|strlen > 0 ?}
	{? assign var=has_error value=true ?}
{? else ?}
	{? assign var=has_error value=false ?}
{? /if ?}

<fieldset id="sign" class="signin">
	<legend>Sign in</legend>
		<form action="/soj/php/account/do_signin.php" method="post">
			
			<div class="error" {? if !$has_error ?}style="display:none;"{? /if ?}>
			
				{? if $errors|@is_array ?}
					{?* do someting *?}
				{? else ?}
					{? $errors|escape ?}
				{? /if ?}
			
			</div>

			<div id="username_container" class="row">
			<label for="username">Username</label>
			<input type="text" name="username" class="text" value="{? $cookie_username ?}"/>
			</div>
			
			<div id="passwd_container" class="row">
			<label for="password">Password</label>
			<input type="password" name="passwd" class="passwd"/>
			</div>
			
			<div id="mem_pass_container" class="row">
			<label for="set_cookie">Remanber you</label>
			<input type="checkbox" name="set_cookie" class=""/>
			</div>
		
			{? if $captcha ?}
			
			<!-- captcha -->
			<img class="captcha" src="{? $captcha_path_and_file_name ?}"/>
			<div id="captcha_container" class="row">
			<label for="captcha">Enter above phase</label>
			<input type="text" name="captcha_value" class="text"/>
			</div>
		
			{? /if ?}
			
			
			<div id="forgot_pass_container" class="row">
			<label for="forgot_pass"><a href="#">Forgot password ?</a></label>
			</div>

			<div id="go_signup_container" class="row">
			<label for="go_signup"><a href="./signup.php">Not member yet ?</a></label>
			</div>
			
			<div class="submit">
			<input type="submit" value="Sign in" />
			</div>
		</form>
</fieldset>
<div id="sign_help_info" class="sign_in">
	<h3>Tips</h3>
	<p>
	there have nothing needs help :-)
	</p>
</div>
